当userid<5时出现退出按钮,当userid>5出现登陆按钮,怎么写asp代码?

来源:百度知道 编辑:UC知道 时间:2024/05/27 02:45:35
想写一段代码,当userid<5时出现退出按钮,当userid>5出现登陆按钮
userid的信息已经储存在 session中
点退出按钮后会到 farewell.asp 点登陆后到welcome.asp
怎么写呢?

<%if userid <5 then%>
<input type="button" name="Submit" value="退出" onClick="javascript:window.location.href='farewell.asp'">
<%end if%>
<%if userid >5 then%>
<input name="Submit" type="button" value="登录" onClick="javascript:window.location.href='welcome.asp'">
<%end if%>